Skip to content

Instantly share code, notes, and snippets.

@SebaUbuntu
SebaUbuntu / README.md
Last active May 9, 2024 10:17
Generate framework compatibility matrix from fqnames

Generate framework compatibility matrix from fqnames

  • Download these 2 files
  • Compile AOSP without fcm from stock and wait for check_vintf to error out
  • Delete Python prefix from all lines (e.g. checkvintf E 06-24 00:30:22 49120 49120 check_vintf.cpp:554])
  • Paste the result in fqnames.txt
  • Launch the script
@enesien
enesien / shadcn-multi-tag-input.md
Last active May 9, 2024 10:15
shadcn multiple tag input

shadcn/ui multi tag input component

A react tag input field component using shadcn, like one you see when adding keywords to a video on YouTube. Usable with Form or standalone.

Preview

image

Standalone Usage

@nicolasdao
nicolasdao / open_source_licenses.md
Last active May 9, 2024 10:14
What you need to know to choose an open source license.
@scruel
scruel / fix-ms-input-pinyin-phrase.py
Last active May 9, 2024 10:14
修正微软拼音输入法无法添加多个格式化自定义短语的问题,默认添加 sj 和 rq 两个自定义短语
"""
修正微软拼音输入法无法添加多个格式化自定义短语的问题
Author: Scruel Tao
"""
import os
import re
import pathlib
import traceback
from pathlib import Path
@chessmango
chessmango / README.md
Last active May 9, 2024 10:13
Simple Bash add-apt-repository drop-in

Things are awkward in the apt world while apt-key is deprecated and things like Launchpad and general PPA usage are in flux.

This snippet attempts to replicate add-apt-repository functionality for sanity, probably quite badly. There's no error checking or anything advanced, but at least the script is easy to understand.

Syntax: [sudo] addaptrepo.sh <repo-string> <gpg-key-fingerprint>

Then follow up with [sudo] apt-get update. I'm not making that call for you :P

You can find the gpg key fingerprint for a Launchpad repo by expanding Technical details about this PPA.

Async and Await: Here be dragons

Overview

  • Background
  • Basics
  • Concepts
  • Examples

In the Beginning …

@wojteklu
wojteklu / clean_code.md
Last active May 9, 2024 10:09
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active May 9, 2024 10:01
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized

Docker Hub 镜像加速器

国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。Docker 官方和国内很多云服务商都提供了国内加速器服务。

Dockerized 实践 https://github.com/y0ngb1n/dockerized

配置加速地址

Ubuntu 16.04+、Debian 8+、CentOS 7+